use "gles_w15.dta",replace 
*------------------*	   
* Data preparation *
*------------------*	
* drop respondents from Sample A4 as they are only in the panel from wave 15 onward 
drop if sample==6

* create dummpy for respondents who were surveyed on 3rd Nov 2020 (US election)
clonevar date_w14_str=kp14_date_of_last_access
replace date_w14_str="." if date_w14=="-95 nicht teilgenommen"
replace date_w14_str=substr(date_w14_str,1,10)
generate date_w14 = date(date_w14_str, "YMD")
format date_w14 %td
gen drop=1
replace drop=0 if date_w14==(td(03Nov2020))

*****************************
* expressed vote preference *
*****************************
*** Far-right (including AfD, RECHTE, NPD, REP)
* Vote intention: party vote 
forvalues i=13/15{ 
	fre kp`i'_190bb
	gen fr_party_`i'=. 
	replace fr_party_`i'=0 if kp`i'_190bb==1 | kp`i'_190bb==4 | kp`i'_190bb==5 | kp`i'_190bb==6 | kp`i'_190bb==7 | kp`i'_190ba==801 
	replace fr_party_`i'=1 if kp`i'_190bb==322 | kp`i'_190bb==323 | kp`i'_190bb==206 | kp`i'_190bb==225
}
tab kp13_190bb fr_party_13, m  
tab kp14_190bb fr_party_14, m   
tab kp15_190bb fr_party_15, m   

* Vote intention: candidate vote 
forvalues i=13/15{ 
	fre kp`i'_190ab
	gen fr_cand_`i'=. 
	replace fr_cand_`i'=0 if kp`i'_190ab==1 | kp`i'_190ab==4 | kp`i'_190ab==5 | kp`i'_190ab==6 | kp`i'_190ab==7 | kp`i'_190aa==801 
	replace fr_cand_`i'=1 if kp`i'_190ab==322 | kp`i'_190ab==323 | kp`i'_190ab==206 | kp`i'_190ab==225
}
tab kp13_190ab fr_cand_13, m  
tab kp14_190ab fr_cand_14, m  
tab kp15_190ab fr_cand_15, m  

* Vote intention: party vote (with missing: did not intend to vote (-97); don't know (-98); no answer (-99))
forvalues i=13/15{ 
	fre kp`i'_190bb
	gen m_fr_party_`i'=. 
	replace m_fr_party_`i'=0 if kp`i'_190bb==1 | kp`i'_190bb==4 | kp`i'_190bb==5 | kp`i'_190bb==6 | kp`i'_190bb==7 | kp`i'_190ba==801 | kp`i'_190bb==-97 | kp`i'_190bb==-98 | kp`i'_190bb==-99 
	replace m_fr_party_`i'=1 if kp`i'_190bb==322 | kp`i'_190bb==323 | kp`i'_190bb==206 | kp`i'_190bb==225
}
tab kp13_190bb m_fr_party_13, m  
tab kp14_190bb m_fr_party_14, m   
tab kp15_190bb m_fr_party_15, m   

* Vote intention: candidate vote (with missing: did not intend to vote (-97); don't know (-98); no answer (-99))
forvalues i=13/15{ 
	fre kp`i'_190ab
	gen m_fr_cand_`i'=. 
	replace m_fr_cand_`i'=0 if kp`i'_190ab==1 | kp`i'_190ab==4 | kp`i'_190ab==5 | kp`i'_190ab==6 | kp`i'_190ab==7 | kp`i'_190aa==801 | kp`i'_190ab==-97 | kp`i'_190ab==-98 | kp`i'_190ab==-99
	replace m_fr_cand_`i'=1 if kp`i'_190ab==322 | kp`i'_190ab==323 | kp`i'_190ab==206 | kp`i'_190ab==225
}
tab kp13_190ab m_fr_cand_13, m  
tab kp14_190ab m_fr_cand_14, m  
tab kp15_190ab m_fr_cand_15, m  


*** Linke
* Vote intention: party vote 
forvalues i=13/15{ 
	fre kp`i'_190ba
	gen linke_party_`i'=. 
	replace linke_party_`i'=1 if kp`i'_190ba==7
	replace linke_party_`i'=0 if kp`i'_190ba==1 | kp`i'_190ba==4 | kp`i'_190ba==5 | kp`i'_190ba==6 | kp`i'_190ba==322 | kp`i'_190ba==801 
}

* Vote intention: candidate vote 
forvalues i=13/15{ 
	fre kp`i'_190aa
	gen linke_cand_`i'=. 
	replace linke_cand_`i'=1 if kp`i'_190aa==7
	replace linke_cand_`i'=0 if kp`i'_190aa==1 | kp`i'_190aa==4 | kp`i'_190aa==5 | kp`i'_190aa==6 | kp`i'_190aa==322 | kp`i'_190aa==801 
}



*** Green Party
* Vote intention: party vote
forvalues i=13/15{ 
	fre kp`i'_190ba
	gen gr_party_`i'=. 
	replace gr_party_`i'=1 if kp`i'_190ba==6
	replace gr_party_`i'=0 if kp`i'_190ba==1 | kp`i'_190ba==4 | kp`i'_190ba==5 | kp`i'_190ba==7 | kp`i'_190ba==322 | kp`i'_190ba==801 
}

* Vote intention: candidate vote 
forvalues i=13/15{ 
	fre kp`i'_190aa
	gen gr_cand_`i'=. 
	replace gr_cand_`i'=1 if kp`i'_190aa==6
	replace gr_cand_`i'=0 if kp`i'_190aa==1 | kp`i'_190aa==4 | kp`i'_190aa==5 | kp`i'_190aa==7 | kp`i'_190aa==322 | kp`i'_190aa==801 
}

***********************************************************
* We need strong leaders so we can live safely in society *
***********************************************************
forvalues i=13/15{ 
	fre kp`i'_060j // 
	gen strong_`i'=. 
	replace strong_`i'=kp`i'_060j
	replace strong_`i'=. if kp`i'_060j==-93 | kp`i'_060j==-95 | kp`i'_060j==-99
}
tab strong_15 kp15_060j, m
* dummy for strong leaders
gen strong_l=.
replace strong_l=strong_13


******************************
* Left-right self-assessment *
******************************
forvalues i=13/15{ 
	fre kp`i'_1500
	gen lr_self`i'=. 
	replace lr_self`i'=kp`i'_1500
	replace lr_self`i'=. if kp`i'_1500==-93 | kp`i'_1500==-95 | kp`i'_1500==-99 | kp`i'_1500==-98
}
fre lr_self13
fre lr_self14
fre lr_self15


**************************************************************
* attrition (terminate survey (-93); not participated (-95)) *
**************************************************************
* party vote
gen dropout_party_14=.
replace dropout_party_14=1 if kp14_190bb==-93 | kp14_190bb==-95
replace dropout_party_14=0 if kp14_190bb!=-93 & kp14_190bb!=-95 

gen dropout_party_15=.
replace dropout_party_15=1 if kp15_190bb==-93 | kp15_190bb==-95
replace dropout_party_15=0 if kp15_190bb!=-93 & kp15_190bb!=-95 
tab kp14_190bb dropout_party_14, m
tab kp15_190bb dropout_party_15, m

* candidate vote 
gen dropout_cand_14=.
replace dropout_cand_14=1 if kp14_190ab==-93 | kp14_190ab==-95
replace dropout_cand_14=0 if kp14_190ab!=-93 & kp14_190ab!=-95   
tab dropout_cand_14 kp14_190ab, m

gen dropout_cand_15=.
replace dropout_cand_15=1 if kp15_190ab==-93 | kp15_190ab==-95
replace dropout_cand_15=0 if kp15_190ab!=-93 & kp15_190ab!=-95   
tab  kp14_190ab dropout_cand_14, m
tab  kp15_190ab dropout_cand_15, m


*****************************
* check no. of observations *
*****************************
tab kp13_190ba kp13_170, m

tab kp13_190ba fr_party_13, m
tab kp14_190ba fr_party_14, m
tab kp15_190ba fr_party_15, m

tab kp13_190ba m_fr_party_13, m
tab kp14_190ba m_fr_party_14, m
tab kp15_190ba m_fr_party_15, m

tab kp13_190aa m_fr_cand_13, m
tab kp14_190aa m_fr_cand_14, m
tab kp15_190aa m_fr_cand_15, m


***********
* reshape *
***********
rename lfdn id 
save "gles_wide.dta", replace 
reshape long fr_cand_ fr_party_ m_fr_cand_ m_fr_party_ lr_self strong_  /// 
	 linke_cand_ linke_party_  gr_cand_ gr_party_ , i(id) j(wave) //
bysort id: carryforward strong_l, gen(strong)
save "gles.dta", replace 

*******************
* sample checking *
*******************
tab fr_party_ wave, m
tab fr_cand_ wave, m
tab m_fr_party_ wave, m
tab m_fr_cand_ wave, m



*-----------------------------------------------------------------*	   
* Main analysis: reducing expressed support for far-right parties * 
*-----------------------------------------------------------------*	  
use "gles.dta", replace 

* declare panel 
tsset id wave  
 
*** far-right 
* party vote
eststo fr_party: xtreg fr_party_  i.wave if drop==1, fe vce(cluster id)
lincom 14.wave-15.wave
estadd local fe "Yes": fr_party
margins, exp(predict(xb)) at(wave=(13(1)15)) noestimcheck saving(fr_party,replace)
marginsplot, title("      (a) ", size(medium) pos(11))  ///
xtitle("") xlab(13 `" "Wave 13" "(20/4/2020" "to 6/5/2020)""' 14 `" "Wave 14" "(4/11/2020" "to 17/11/2020)""' 15 `" "Wave 15" "(25/2/2021" "to 12/3/2021)""')  ///
xline(13.95, lwidth(thick) lcolor(ply3)) xline(14.6, lwidth(thick)  lpattern(longdash_dot)  lcolor(red))  graphregion(margin(r+10)) ///
ytitle("Pr(voting for a far-right party)", size(medium)) ylab(0.11(0.005)0.135) ///
text(0.123 13.85 "US presidential election" 0.123 14.50 "January 6th insurrection ", orient(vertical)) ///
saving(fr_party,replace) scheme(538w) 
coefplot, keep(14.wave 15.wave) yline(0) msymbol(s) mfcolor(white)   ///
   coeflab(14.wave="Wave 14 " 15.wave="Wave 15") ///
   levels(95 90)  ciopts(lwidth(*1 *3)) vertical  title("(b) ", size(medium) pos(11)) ytitle("Coefficient estimate", size(medium)) ylab(-0.03(0.01)0) ///
   saving(fr_party_dydx, replace) scheme(538bw)

* candidate vote
eststo fr_cand: xtreg fr_cand_  i.wave if drop==1, fe vce(cluster id)
lincom 14.wave-15.wave
estadd local fe "Yes": fr_cand
margins, exp(predict(xb)) at(wave=(13(1)15)) noestimcheck saving(fr_cand,replace)
marginsplot, title("      (c) ", size(medium) pos(11))  ///
xtitle("") xlab(13 `" "Wave 13" "(20/4/2020" "to 6/5/2020)""' 14 `" "Wave 14" "(4/11/2020" "to 17/11/2020)""' 15 `" "Wave 15" "(25/2/2021" "to 12/3/2021)""')  ///
xline(13.95, lwidth(thick) lcolor(ply3)) xline(14.6, lwidth(thick)  lpattern(longdash_dot)  lcolor(red))  graphregion(margin(r+10)) ///
ytitle("Pr(voting for a far-right candidate)", size(medium)) ylab(0.11(0.005)0.135) ///
text(0.123 13.85 "US presidential election" 0.123 14.50 "January 6th insurrection ", orient(vertical)) ///
saving(fr_cand,replace) scheme(538w) 
//graph export "fr_cand.png",  as(png) replace
coefplot, keep(14.wave 15.wave) yline(0) msymbol(s) mfcolor(white)   ///
   coeflab(14.wave="Wave 14 " 15.wave="Wave 15") ///
   levels(95 90)  ciopts(lwidth(*1 *3)) vertical  title("(d) ", size(medium) pos(11)) ytitle("Coefficient estimate", size(medium)) ylab(-0.03(0.01)0) ///
   saving(fr_cand_dydx, replace) scheme(538bw)
   
graph combine fr_party.gph fr_party_dydx.gph fr_cand.gph fr_cand_dydx.gph, graphregion(color(white))
graph export  "fr_cand+party.png", replace


* regression table
esttab  fr_party fr_cand using "fr_main.rtf", b(2) se(2) replace ///
	stats(N N_g fe r2, fmt(%9.0fc %9.0fc %9.0fc %9.2fc) ///
	labels("Observations" "Clusters" "Individual FE" "R-squared")) ///
	label wide note onecell nobaselevels  noomitted nonumbers  lines varwidth(12) ///
	coeflabel(14.wave "wave 14" 15.wave "wave 15") ///
	mtitles("(1) Party vote: Far-right" "(2) Candidate vote: Far-right") modelwidth(10) ///
	star(+ 0.10 * 0.05 ** 0.01 *** 0.001)  ///
	note("Note: Entries are coefficients of individual fixed effect regression. Standard errors are clustered at individual level and are shown in parentheses.") ///
	title("Table C.2. Effect of Capitol insurrection on the expressed support for the domestic far-right party") 

	
*-------------------*	   
* Robustness checks *
*-------------------*	

*********************************
* Far-right vote (with missing) *
*********************************
* party vote
eststo m_fr_party: xtreg m_fr_party_  i.wave if drop==1, fe vce(cluster id)
lincom 14.wave-15.wave
estadd local fe "Yes": m_fr_party
margins, exp(predict(xb)) at(wave=(13(1)15)) noestimcheck saving(m_fr_party,replace)
marginsplot, title("       (a) ", size(medium) pos(11))  ///
xtitle("") xlab(13 `" "Wave 13" "(20/4/2020" "to 6/5/2020)""' 14 `" "Wave 14" "(4/11/2020" "to 17/11/2020)""' 15 `" "Wave 15" "(25/2/2021" "to 12/3/2021)""')  ///
xline(13.95, lwidth(thick) lcolor(ply3)) xline(14.6, lwidth(thick)  lpattern(longdash_dot)  lcolor(red))  graphregion(margin(r+10)) ///
ytitle("Pr(voting for a far-right party)", size(medium)) ylab(0.085(0.005)0.11) ///
text(0.098 13.85 "US presidential election" 0.098 14.50 "January 6th insurrection ", orient(vertical)) ///
saving(m_fr_party,replace) scheme(538w) 
coefplot, keep(14.wave 15.wave) yline(0) msymbol(s) mfcolor(white)   ///
   coeflab(14.wave="Wave 14 " 15.wave="Wave 15") ///
   levels(95 90)  ciopts(lwidth(*1 *3)) vertical  title("(b) Coefficient estimate", size(medium) pos(11)) ytitle("") ylab(-0.03(0.01)0) ///
   saving(m_fr_party_dydx, replace) scheme(538bw)

* candidate vote 
eststo m_fr_cand: xtreg m_fr_cand_  i.wave if drop==1, fe vce(cluster id)
lincom 14.wave-15.wave
estadd local fe "Yes": m_fr_cand
margins, exp(predict(xb)) at(wave=(13(1)15)) noestimcheck saving(m_fr_cand,replace)
marginsplot, title("       (c) ", size(medium) pos(11))  ///
xtitle("") xlab(13 `" "Wave 13" "(20/4/2020" "to 6/5/2020)""' 14 `" "Wave 14" "(4/11/2020" "to 17/11/2020)""' 15 `" "Wave 15" "(25/2/2021" "to 12/3/2021)""')  ///
xline(13.95, lwidth(thick) lcolor(ply3)) xline(14.6, lwidth(thick)  lpattern(longdash_dot)  lcolor(red))  graphregion(margin(r+10)) ///
ytitle("Pr(voting for a far-right candidate)", size(medium)) ylab(0.085(0.005)0.11) ///
text(0.098 13.85 "US presidential election" 0.098 14.50 "January 6th insurrection ", orient(vertical)) ///
saving(m_fr_cand,replace) scheme(538w) 
coefplot, keep(14.wave 15.wave) yline(0) msymbol(s) mfcolor(white)   ///
   coeflab(14.wave="Wave 14 " 15.wave="Wave 15") ///
   levels(95 90)  ciopts(lwidth(*1 *3)) vertical  title("(d) Coefficient estimate", size(medium) pos(11)) ytitle("") ylab(-0.03(0.01)0) ///
   saving(m_fr_cand_dydx, replace) scheme(538bw)
   
graph combine m_fr_party.gph m_fr_party_dydx.gph m_fr_cand.gph m_fr_cand_dydx.gph
graph export  "m_adf_cand+party.png", replace

* regression table
esttab  m_fr_party m_fr_cand using "m_afd.rtf", b(2) se(2) replace ///
	stats(N N_g fe r2, fmt(%9.0fc %9.0fc %9.0fc %9.2fc) ///
	labels("Observations" "Clusters" "Individual FE" "R-squared")) ///
	label wide note onecell nobaselevels  noomitted nonumbers  lines varwidth(12) ///
	coeflabel(14.wave "wave 14" 15.wave "wave 15") ///
	mtitles("(1) Party vote: AfD " "(2) Candidate vote: AfD") modelwidth(10) ///
	star(+ 0.10 * 0.05 ** 0.01 *** 0.001)  ///
	note("Note: Entries are coefficients of individual fixed effect regression. Standard errors are clustered at individual level and are shown in parentheses.") ///
	title("Table C.3. Including respondents who do not express vote preference") 

   
**************************
* differential attrition *
**************************
preserve
use "gles_wide.dta", replace 
* party vote
ttest dropout_party_15 if drop==1, by(fr_party_13)
* candidate vote 
ttest dropout_cand_15 if drop==1, by(fr_cand_13)
restore


********************
* Placebo outcomes *
********************
*** Linke
* party vote
eststo linke_party: xtreg linke_party_  i.wave if drop==1, fe vce(cluster id)
estadd local fe "Yes": linke_party
margins, exp(predict(xb)) at(wave=(13(1)15)) noestimcheck saving(linke_party,replace)
marginsplot, title("      (a) ", size(medium) pos(11))  plot1opts(lcolor(plr1) mcolor(plr1)) ci1opt(color(plr1)) ///
xtitle("") xlab(13 `" "Wave 13" "(20/4/2020" "to 6/5/2020)""' 14 `" "Wave 14" "(4/11/2020" "to 17/11/2020)""' 15 `" "Wave 15" "(25/2/2021" "to 12/3/2021)""')  ///
xline(13.95, lwidth(thick) lcolor(ply3)) xline(14.6, lwidth(thick)  lpattern(longdash_dot)  lcolor(red))  graphregion(margin(r+10)) ///
ytitle("Pr(voting for the Linke party)", size(medium)) ylab(0.11(0.005)0.135) ///
text(0.122 13.85 "US presidential election" 0.122 14.50 "January 6th insurrection ", orient(vertical)) ///
saving(linke_party,replace) scheme(538w) 
coefplot, keep(14.wave 15.wave) yline(0) msymbol(s) mfcolor(white)   ///
   coeflab(14.wave="Wave 14 " 15.wave="Wave 15") ///
   levels(95 90)  ciopts(lwidth(*1 *3)) vertical  title("(b) ", size(medium) pos(11)) ytitle("Coefficient estimate", size(medium)) ylab(-0.01(0.01)0.02) ///
   saving(linke_party_dydx, replace) scheme(538bw)

* candidate vote   
eststo linke_cand: xtreg linke_cand_  i.wave if drop==1, fe vce(cluster id)
estadd local fe "Yes": linke_cand
margins, exp(predict(xb)) at(wave=(13(1)15)) noestimcheck saving(linke_cand,replace)
marginsplot, title("      (c) ", size(medium) pos(11)) plot1opts(lcolor(plr1) mcolor(plr1)) ci1opt(color(plr1)) ///
xtitle("") xlab(13 `" "Wave 13" "(20/4/2020" "to 6/5/2020)""' 14 `" "Wave 14" "(4/11/2020" "to 17/11/2020)""' 15 `" "Wave 15" "(25/2/2021" "to 12/3/2021)""')  ///
xline(13.95, lwidth(thick) lcolor(ply3)) xline(14.6, lwidth(thick)  lpattern(longdash_dot)  lcolor(red))  graphregion(margin(r+10)) ///
ytitle("Pr(voting for the Linke candidate)", size(medium)) ylab(0.11(0.005)0.135) ///
text(0.120 13.85 "US presidential election" 0.120 14.50 "January 6th insurrection ", orient(vertical)) ///
saving(linke_cand,replace) scheme(538w) 
coefplot, keep(14.wave 15.wave) yline(0) msymbol(s) mfcolor(white)   ///
   coeflab(14.wave="Wave 14 " 15.wave="Wave 15") ///
   levels(95 90)  ciopts(lwidth(*1 *3)) vertical  title("(d) ", size(medium) pos(11)) ytitle("Coefficient estimate", size(medium)) ylab(-0.01(0.01)0.02) ///
   saving(linke_cand_dydx, replace) scheme(538bw)
   
graph combine linke_party.gph linke_party_dydx.gph linke_cand.gph linke_cand_dydx.gph, graphregion(color(white))
graph export  "linke_cand+party.png", replace

*** Green Party
* party vote   
eststo gr_party: xtreg gr_party_  i.wave if drop==1, fe vce(cluster id)
estadd local fe "Yes": gr_party
margins, exp(predict(xb)) at(wave=(13(1)15)) noestimcheck saving(gr_party,replace)
marginsplot, title("      (a) ", size(medium) pos(11))  plot1opts(lcolor(plg1) mcolor(plg1)) ci1opt(color(plg1)) ///
xtitle("") xlab(13 `" "Wave 13" "(20/4/2020" "to 6/5/2020)""' 14 `" "Wave 14" "(4/11/2020" "to 17/11/2020)""' 15 `" "Wave 15" "(25/2/2021" "to 12/3/2021)""')  ///
xline(13.95, lwidth(thick) lcolor(ply3)) xline(14.6, lwidth(thick)  lpattern(longdash_dot)  lcolor(red))  graphregion(margin(r+10)) ///
ytitle("Pr(voting for the Green party)", size(medium)) ylab(0.165(0.005)0.20) ///
text(0.182 13.85 "US presidential election" 0.182 14.50 "January 6th insurrection ", orient(vertical)) ///
saving(gr_party,replace) scheme(538w) 
coefplot, keep(14.wave 15.wave) yline(0) msymbol(s) mfcolor(white)   ///
   coeflab(14.wave="Wave 14 " 15.wave="Wave 15") ///
   levels(95 90)  ciopts(lwidth(*1 *3)) vertical  title("(b) ", size(medium) pos(11)) ytitle("Coefficient estimate", size(medium)) ylab(-0.01(0.01)0.02) ///
   saving(gr_party_dydx, replace) scheme(538bw)

* candidate vote
eststo gr_cand: xtreg gr_cand_  i.wave if drop==1, fe vce(cluster id)
estadd local fe "Yes": gr_cand
margins, exp(predict(xb)) at(wave=(13(1)15)) noestimcheck saving(gr_cand,replace)
marginsplot, title("      (c) ", size(medium) pos(11)) plot1opts(lcolor(plg1) mcolor(plg1)) ci1opt(color(plg1)) ///
xtitle("") xlab(13 `" "Wave 13" "(20/4/2020" "to 6/5/2020)""' 14 `" "Wave 14" "(4/11/2020" "to 17/11/2020)""' 15 `" "Wave 15" "(25/2/2021" "to 12/3/2021)""')  ///
xline(13.95, lwidth(thick) lcolor(ply3)) xline(14.6, lwidth(thick)  lpattern(longdash_dot)  lcolor(red))  graphregion(margin(r+10)) ///
ytitle("Pr(voting for the Green candidate)", size(medium)) ylab(0.165(0.005)0.20) ///
text(0.182 13.85 "US presidential election" 0.182 14.50 "January 6th insurrection ", orient(vertical)) ///
saving(gr_cand,replace) scheme(538w) 
coefplot, keep(14.wave 15.wave) yline(0) msymbol(s) mfcolor(white)   ///
   coeflab(14.wave="Wave 14 " 15.wave="Wave 15") ///
   levels(95 90)  ciopts(lwidth(*1 *3)) vertical  title("(d) ", size(medium) pos(11)) ytitle("Coefficient estimate", size(medium)) ylab(-0.01(0.01)0.02) ///
   saving(gr_cand_dydx, replace) scheme(538bw)
   
graph combine gr_party.gph gr_party_dydx.gph gr_cand.gph gr_cand_dydx.gph, graphregion(color(white))
graph export  "gr_cand+party.png", replace

* regression table
esttab  linke_party linke_cand gr_party gr_cand using "linke+gr_main.rtf", b(2) se(2) replace ///
	stats(N N_g fe r2, fmt(%9.0fc %9.0fc %9.0fc %9.2fc) ///
	labels("Observations" "Clusters" "Individual FE" "R-squared")) ///
	label wide note onecell nobaselevels  noomitted nonumbers  lines varwidth(12) ///
	coeflabel(14.wave "wave 14" 15.wave "wave 15") ///
	mtitles("(1) Party vote: Linke " "(2) Candidate vote: Linke" "(3) Party vote: Green" "(4) Candidate vote: Green") modelwidth(10) ///
	star(+ 0.10 * 0.05 ** 0.01 *** 0.001)  ///
	note("Note: Entries are coefficients of individual fixed effect regression. Standard errors are clustered at individual level and are shown in parentheses.") ///
	title("Table C.5. Placebo outcomes: Linke and the Green") 	
	
***********************************************************
* including respondents who were surveyed on 3rd Nov 2020 *
***********************************************************
* party vote
eststo fr_party_d: xtreg fr_party_  i.wave if drop==0 | drop==1, fe vce(cluster id)
lincom 14.wave-15.wave
estadd local fe "Yes": fr_party_d
margins, exp(predict(xb)) at(wave=(13(1)15)) noestimcheck saving(fr_party_d,replace)
marginsplot, title("      (a) ", size(medium) pos(11))  ///
xtitle("") xlab(13 `" "Wave 13" "(20/4/2020" "to 6/5/2020)""' 14 `" "Wave 14" "(4/11/2020" "to 17/11/2020)""' 15 `" "Wave 15" "(25/2/2021" "to 12/3/2021)""')  ///
xline(13.95, lwidth(thick) lcolor(ply3)) xline(14.6, lwidth(thick)  lpattern(longdash_dot)  lcolor(red))  graphregion(margin(r+10)) ///
ytitle("Pr(voting for a far-right party)", size(medium)) ylab(0.11(0.005)0.135) ///
text(0.122 13.85 "US presidential election" 0.122 14.50 "January 6th insurrection ", orient(vertical)) ///
saving(fr_party_d,replace) scheme(538w) 
coefplot, keep(14.wave 15.wave) yline(0) msymbol(s) mfcolor(white)   ///
   coeflab(14.wave="Wave 14 " 15.wave="Wave 15") ///
   levels(95 90)  ciopts(lwidth(*1 *3)) vertical  title("(b) ", size(medium) pos(11)) ytitle("Coefficient estimate", size(medium)) ylab(-0.03(0.01)0) ///
   saving(fr_party_d_dydx, replace) scheme(538bw)

* candidate vote 
eststo fr_cand_d: xtreg fr_cand_  i.wave if drop==0 | drop==1, fe vce(cluster id)
lincom 14.wave-15.wave
estadd local fe "Yes": fr_cand_d
margins, exp(predict(xb)) at(wave=(13(1)15)) noestimcheck saving(fr_cand_d,replace)
marginsplot, title("      (c) ", size(medium) pos(11))  ///
xtitle("") xlab(13 `" "Wave 13" "(20/4/2020" "to 6/5/2020)""' 14 `" "Wave 14" "(4/11/2020" "to 17/11/2020)""' 15 `" "Wave 15" "(25/2/2021" "to 12/3/2021)""')  ///
xline(13.95, lwidth(thick) lcolor(ply3)) xline(14.6, lwidth(thick)  lpattern(longdash_dot)  lcolor(red))  graphregion(margin(r+10)) ///
ytitle("Pr(voting for a far-right candidate)", size(medium)) ylab(0.11(0.005)0.135) ///
text(0.120 13.85 "US presidential election" 0.120 14.50 "January 6th insurrection ", orient(vertical)) ///
saving(fr_cand_d,replace) scheme(538w) 
coefplot, keep(14.wave 15.wave) yline(0) msymbol(s) mfcolor(white)   ///
   coeflab(14.wave="Wave 14 " 15.wave="Wave 15") ///
   levels(95 90)  ciopts(lwidth(*1 *3)) vertical  title("(d) ", size(medium) pos(11)) ytitle("Coefficient estimate", size(medium)) ylab(-0.03(0.01)0) ///
   saving(fr_cand_d_dydx, replace) scheme(538bw)
   
graph combine fr_party_d.gph fr_party_d_dydx.gph fr_cand_d.gph fr_cand_d_dydx.gph, graphregion(color(white))
graph export  "fr_cand+party_d.png", replace


* regression table
esttab  fr_party_d fr_cand_d using "fr_d.rtf", b(2) se(2) replace ///
	stats(N N_g fe r2, fmt(%9.0fc %9.0fc %9.0fc %9.2fc) ///
	labels("Observations" "Clusters" "Individual FE" "R-squared")) ///
	label wide note onecell nobaselevels  noomitted nonumbers  lines varwidth(12) ///
	coeflabel(14.wave "wave 14" 15.wave "wave 15") ///
	mtitles("(1) Party vote: far-right" "(2) Candidate vote: far-right") modelwidth(10) ///
	star(+ 0.10 * 0.05 ** 0.01 *** 0.001)  ///
	note("Note: Entries are coefficients of individual fixed effect regression. Standard errors are clustered at individual level and are shown in parentheses.") ///
	title("Table C.6. Including respondents who were surveyed on 3rd Nov 2020")    



* ------------------
* Additional analysis
* ------------------		
* left/right placement
eststo lr_self: xtreg lr_self i.wave if drop==1, fe vce(cluster id)
lincom 14.wave-15.wave
estadd local fe "Yes": lr_self
margins, exp(predict(xb)) at(wave=(13(1)15)) noestimcheck saving(lr_self,replace)
marginsplot, title("      (a) ", size(medium) pos(11))  ///
xtitle("") xlab(13 `" "Wave 13" "(20/4/2020" "to 6/5/2020)""' 14 `" "Wave 14" "(4/11/2020" "to 17/11/2020)""' 15 `" "Wave 15" "(25/2/2021" "to 12/3/2021)""')  ///
xline(13.95, lwidth(thick) lcolor(ply3)) xline(14.6, lwidth(thick)  lpattern(longdash_dot)  lcolor(red))  graphregion(margin(r+10)) ///
ytitle("Predicted left/right self-placement", size(medium)) ylab(5.4(0.05)5.6) ///
text(5.5 13.85 "US presidential election" 5.5 14.50 "January 6th insurrection ", orient(vertical)) ///
saving(lr_self,replace) scheme(538w) 
coefplot, keep(14.wave 15.wave) yline(0) msymbol(s) mfcolor(white)   ///
   coeflab(14.wave="Wave 14 " 15.wave="Wave 15") ///
   levels(95 90)  ciopts(lwidth(*1 *3)) vertical  title("(b) ", size(medium) pos(11)) ytitle("Coefficient estimate", size(medium)) ylab(-0.10(0.02)0.02) ///
   saving(lr_self_dydx, replace) scheme(538bw)

graph combine lr_self.gph lr_self_dydx.gph, graphregion(color(white))
graph export  "lr_self.png", replace
	
	
	
* strong leader
eststo strong: xtreg strong_ i.wave if drop==1, fe vce(cluster id)	
lincom 14.wave-15.wave
sum strong  if drop==1
display .0665412/1.022557 
estadd local fe "Yes": strong
margins, exp(predict(xb)) at(wave=(13(1)15)) noestimcheck saving(strong, replace)
marginsplot, title("      (a) ", size(medium) pos(11))  ///
xtitle("") xlab(13 `" "Wave 13" "(20/4/2020" "to 6/5/2020)""' 14 `" "Wave 14" "(4/11/2020" "to 17/11/2020)""' 15 `" "Wave 15" "(25/2/2021" "to 12/3/2021)""')  ///
xline(13.95, lwidth(thick) lcolor(ply3)) xline(14.6, lwidth(thick)  lpattern(longdash_dot)  lcolor(red))  graphregion(margin(r+10)) ///
ytitle("Predicted level of support for strong leaders", size(medium)) ylab(3.55(0.05)3.65) ///
text(3.6 13.85 "US presidential election" 3.6 14.50 "January 6th insurrection ", orient(vertical)) ///
saving(strong, replace) scheme(538w) 
coefplot, keep(14.wave 15.wave) yline(0) msymbol(s) mfcolor(white)   ///
   coeflab(14.wave="Wave 14 " 15.wave="Wave 15") ///
   levels(95 90)  ciopts(lwidth(*1 *3)) vertical  title("(b) ", size(medium) pos(11)) ytitle("Coefficient estimate", size(medium)) ylab(-0.10(0.02)0.02) ///
   saving(strong_dydx, replace) scheme(538bw)
graph combine strong.gph strong_dydx.gph, graphregion(color(white))
graph export  "strong.png", replace
   

* regression table
esttab lr_self strong using "lr+strong.rtf", b(2) se(2) replace ///
	stats(N N_g fe r2, fmt(%9.0fc %9.0fc %9.0fc %9.2fc) ///
	labels("Observations" "Clusters" "Individual FE" "R-squared")) ///
	label wide note onecell nobaselevels  noomitted nonumbers  lines varwidth(12) ///
	coeflabel(14.wave "wave 14" 15.wave "wave 15") ///
	mtitles("(1) left/right self-placement" "(2) strong leaders") modelwidth(12) ///
	star(+ 0.10 * 0.05 ** 0.01 *** 0.001)  ///
	note("Note: Entries are coefficients of individual fixed effect regression. Standard errors are clustered at individual level and are shown in parentheses.") ///
	title("Table C.7. Effect of Capitol insurrection on left/right self-placement and support for strong leaders") 
